package com.zzyl.nursing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.github.pagehelper.Page;
import com.zzyl.nursing.dto.ReservationPageDto;
import com.zzyl.nursing.vo.ReservationCountVo;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDateTime;
import java.util.List;

import com.zzyl.nursing.domain.Reservation;
import org.apache.ibatis.annotations.Param;

/**
 * 预约信息Mapper接口
 *
 * @author alexis
 * @date 2025-06-03
 */
@Mapper
public interface ReservationMapper extends BaseMapper<Reservation> {

    void insertReservation(Reservation reservation);

    int countTodayCancelledReservationsByUserIdAndTime(
            @Param("userId") Long userId,
            @Param("startTime") LocalDateTime startTime,
            @Param("endTime") LocalDateTime endTime);

    List<ReservationCountVo> getReservationCountByTime(LocalDateTime Localtime);

    Page<Reservation> getReservationPage(ReservationPageDto reservationPageDto);

}
